refactor: Eliminate unused {Static,Custom}CpuTemplate variants#4391
Closed
roypat wants to merge 1 commit intofirecracker-microvm:mainfrom
Closed
refactor: Eliminate unused {Static,Custom}CpuTemplate variants#4391roypat wants to merge 1 commit intofirecracker-microvm:mainfrom
roypat wants to merge 1 commit intofirecracker-microvm:mainfrom
Conversation
zulinx86
reviewed
Jan 22, 2024
Comment on lines
92
to
102
| /// A CPU template that it is used to filter the CPU features exposed to the guest. | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub cpu_template: Option<StaticCpuTemplate>, | ||
| #[serde( | ||
| default, | ||
| skip_serializing_if = "Option::is_none", | ||
| deserialize_with = "some_option" | ||
| )] | ||
| pub cpu_template: Option<Option<StaticCpuTemplate>>, |
Contributor
There was a problem hiding this comment.
nit: it might be worth noting why it is wrapped with two Options (The outer Option indicates whether cpu_template field is provided or not, and the inner one indicates whether the given cpu_template is "None" or a specific CPU template.)
f335b52 to
4d1995b
Compare
ShadowCurse
reviewed
Jan 22, 2024
They were needed for Versionize reasons, but with firecracker-microvm#4230 merged, we can eliminate them, simplifying the code. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
eacad79 to
b62cc65
Compare
Contributor
Author
|
Closing this, as removing the |
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
They were needed for Versionize reasons, but with #4230 merged, we can eliminate them, simplifying the code.
Changes
...
Reason
...
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
CHANGELOG.md.TODOs link to an issue.rust-vmm.